package com.yixun.qfbao.model.enums;
/**
 * 是否分佣
 * @author ThinkPad
 *
 */
public enum SubCommissionEnum {

	SUB_COMMISSIONSTATUS_VALUE_0("0", "未分佣"), SUB_COMMISSIONSTATUS_VALUE_1("1", "已分佣");
	private String code;
	private String name;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private SubCommissionEnum(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public static SubCommissionEnum getByCode(String code) {
		for (SubCommissionEnum item : SubCommissionEnum.values()) {
			if (item.getCode().equals(code)) {
				return item;
			}
		}
		return null;
	}

}
